<template>
  <div>
    <span>用户名 </span><input type="text" name="username" /><br />
    <span style="margin-right: 15px">密码 </span
    ><input type="text" name="password" />

    <div style="margin-top: 20px">
      <button style="margin-right: 20px">登录</button>
      <button @click="toRegister">注册</button>
     
    </div>
  </div>
</template>
 
<script>
export default {
  name: '',
  components: {},
  props: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    toRegister(){
      /* 用path实现跳转 */
     /*  this.$router.push({
        path:'/register'
      }) */
      /* 用name实现跳转 */
      this.$router.push({
        name:'Register',  //可以两个都传过去
        /* path:'register', */
        query:{
            username:'lay'
            
        },
        params:{
          username1:'paralala',
        
        }
      })
      this.$router.push('/register/lsy')
    }
  }
}
</script>

<style scoped>
</style>